﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using mars_server.csharp.model;
using mars_server.csharp.dao;
using mars_server.csharp.dao.impl;

namespace mars_server.csharp.AO.impl
{
    public class GroupAOImpl : GroupAO
    {
        private GroupAOImpl() { }
        private static readonly GroupAOImpl instance = new GroupAOImpl();

        public static GroupAOImpl Instance
        {
            get
            {
                return instance;
            }
        }

        GroupManager groupManager = GroupManagerImpl.Instance;


        public bool createGroupByGroupDO(GroupDO groupDO)
        {
            if(groupDO == null || groupDO.groupName == "")
            {
                return false;
            }
            if (!groupManager.insertGroupDO(groupDO))
            {
                return false;
            }

            return true;


        }
    }
}
